package com.fzshang.commen.service;

import com.alipay.api.AlipayApiException;
import com.fzshang.commen.bean.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fzshang.commen.bean.layuiBean.ResultPage;
import com.fzshang.commen.bean.layuiBean.VoPage;
import com.fzshang.commen.bean.request.Sale;
import com.fzshang.commen.entity.ApiResult;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * <p>
 * 账户表 服务类
 * </p>
 *
 * @author 冯政尚
 * @since 2020-02-24
 */
public interface UserService extends IService<User> {

    /**
     * @param account
     * @param passWord
     * @return user登陆
     */
    User UserLogin(String account, String passWord);
    /**
     * @param requestUserName
     * @return 判断用户名是否存在
     */
    User userNameIsNall(String requestUserName);
    /**
     * @param requestUserName
     * @param requestPassWord
     * @return 判断用户名对应的密码是否正确
     */
    User passWordIsNall(String requestUserName, String requestPassWord);

    /**
     * @return  查询收入统计
     * @throws Exception
     */
    List<Sale> selectMoney() throws Exception;

    /**
     * @param voPage
     * @return 后台查询
     */
    ResultPage<User> selectMyPage(VoPage voPage, User user);

    //添加角色
    ApiResult saveRole(Long userId, String account);
    //支付
    String zfbPay(User user, HttpServletRequest request) throws AlipayApiException;
    //支付回调
    String aliPayNotify(HttpServletRequest request) throws Exception;
}
